import request from "./request";
/*商家管理
Dish Controller
*/


// 新增菜品
export function addMenuApi(data: any) {
    return request({
        url: '/dish/add',
        method: 'POST',
        data
    })
}


// 删除菜品
export function deleteMenuApi(id: any) {
    return request({
        url: '/dish/delete/'+id,
        method: 'DELETE',
    })
}


// 获取所有商家
export function getAllShopsApi(  ) {
    return request({
        url:  '/business/getAll' ,
        method: 'GET',
    })
}

// 修改菜品 需要传入菜品ID
export function updateApi(data:any) {
    return request({
        url: '/dish/update',
        method: 'PUT',
        data
    })
}
